Multi-core processing systems often perform operations on packet data. The packet data is associated with a program identifier (program ID) that indicates a particular program to be executed by a core to process the packet data. A task manager or work scheduler can assign a particular core to execute the program to process the packet data. This combination of a program and corresponding packet data represents a specific task that is to be executed by the processing system, and in particular, once assigned to the core, this combination represents a specific task of the core. Each core can be assigned multiple tasks.
A task may be divided into one or more portions that are referred to as ordering scopes. When a task has multiple ordering scopes, each ordering scope generally represents an operation to be performed by the task without being interrupted by a task switch. For example, an ordering scope can correspond to a portion of the task's program code that is executed by the core between task switch instructions. An ordering scope can also correspond to an operation to be performed by a non-core resource. For example, an ordering scope can correspond to an operation for which control has been transferred from the core to the non-core resource, such as to a hardware accelerator, to execute on the packet data. Note that when an ordering scope is being executed by a non-core resource, the core assigned to process the ordering scope may not be actively processing that ordering scope. In such case, the core can be used to execute another ordering scope of the task, or to execute another task. When the ordering scope associated with the non-core resource is finished executing on the packet data, the core can resume executing on the original ordering scope, or on a next ordering scope.
A processor core can switch between tasks on ordering scope boundaries (e.g., after completion of one ordering scope and before starting a next ordering scope). However, when switching between tasks, the processor core is typically able to store context information (e.g., state information) for its current task before exiting the current task. The process of saving a particular core's context information for an executing task, and loading stored context information associated with a next task to be processed by the core, is generally referred to as context/task switching. Task switching provides the benefit of enabling a processor core to execute multiple tasks in a time-sliced manner. One cost of task switching is that there is some delay in switching between tasks due to the saving of current context information and the loading of stored context information for the next task. This cost is especially high in systems where a full context switch occurs for each context switch instruction (e.g., at every ordering scope boundary) with no regard as to the next task.
The use of the same reference symbols in different drawings indicates similar or identical items.